package com.navi.loaddata.core.oracleEntity.array;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.sql.Time;
import java.util.Date;

/**
 * Created by Jay on 2018/3/16.
 */
public class EtlArrayPdsGlassSummaryVPK implements Serializable {
    private String stepId;
    private String subEquipId;
    private String glassId;
    private Date glassEndTime;
    private String paramCollection;
    private String paramName;

    @Id
    @Column(name = "STEP_ID")
    public String getStepId() {
        return stepId;
    }

    public void setStepId(String stepId) {
        this.stepId = stepId;
    }

    @Id
    @Column(name = "SUB_EQUIP_ID")
    public String getSubEquipId() {
        return subEquipId;
    }

    public void setSubEquipId(String subEquipId) {
        this.subEquipId = subEquipId;
    }

    @Id
    @Column(name = "GLASS_ID")
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Id
    @Column(name = "GLASS_END_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getGlassEndTime() {
        return glassEndTime;
    }

    public void setGlassEndTime(Date glassEndTime) {
        this.glassEndTime = glassEndTime;
    }

    @Id
    @Column(name = "PARAM_COLLECTION")
    public String getParamCollection() {
        return paramCollection;
    }

    public void setParamCollection(String paramCollection) {
        this.paramCollection = paramCollection;
    }

    @Id
    @Column(name = "PARAM_NAME")
    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlArrayPdsGlassSummaryVPK that = (EtlArrayPdsGlassSummaryVPK) o;

        if (stepId != null ? !stepId.equals(that.stepId) : that.stepId != null) return false;
        if (subEquipId != null ? !subEquipId.equals(that.subEquipId) : that.subEquipId != null) return false;
        if (glassId != null ? !glassId.equals(that.glassId) : that.glassId != null) return false;
        if (glassEndTime != null ? !glassEndTime.equals(that.glassEndTime) : that.glassEndTime != null) return false;
        if (paramCollection != null ? !paramCollection.equals(that.paramCollection) : that.paramCollection != null)
            return false;
        if (paramName != null ? !paramName.equals(that.paramName) : that.paramName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = stepId != null ? stepId.hashCode() : 0;
        result = 31 * result + (subEquipId != null ? subEquipId.hashCode() : 0);
        result = 31 * result + (glassId != null ? glassId.hashCode() : 0);
        result = 31 * result + (glassEndTime != null ? glassEndTime.hashCode() : 0);
        result = 31 * result + (paramCollection != null ? paramCollection.hashCode() : 0);
        result = 31 * result + (paramName != null ? paramName.hashCode() : 0);
        return result;
    }
}
